<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@include file="/WEB-INF/webpage/common/taglibs.jspf"%>
<!DOCTYPE html>
<html>
<head>
    <title>党组织管理</title>
    <meta name="decorator" content="form"/> 
    <html:css name="bootstrap-fileinput" />
    <html:css name="simditor,jquery-select2" />
    <html:js name="jquery-select2"/>
</head>

<body class="white-bg"  formid="djOrgForm">
    <form:form id="djOrgForm"  modelAttribute="data" action="${adminPath}/dj/djorg/save"  method="post" class="form-horizontal">
		<form:hidden path="id"/>
		<table  class="table table-bordered  table-condensed dataTables-example dataTable no-footer">
		   <tbody>
			  <tr>
		         <td class="width-15 active"><label class="pull-right">上级党组织名称:</label></td>
		         <td class="width-35">
		            <form:treeselect title="请选择上级党组织名称" path="parentId" dataUrl="${adminPath}/dj/djorg/treeData" 
		            labelName="parentName" labelValue="${data.parentName}" callback="setCallBack"/>	   
				  </td>
		          <td  class="width-15 active text-right">	
		              <label><font color="red">*</font>党组织名称:</label>
		         </td>
		         <td class="width-35" >
		             <form:input path="name" class="form-control " datatype="*" nullmsg="请输入党组织名称！" htmlEscape="false" />
		             <label class="Validform_checktip"></label>
		         </td>
		      </tr>
				<tr>
					<td  class="width-15 active text-right">	
		              <label>组织类型:</label>
		            </td>
					<td class="width-35">
						<form:input path="orgType" htmlEscape="false" class="form-control"      />
						<label class="Validform_checktip"></label>
					</td>
					<td  class="width-15 active text-right">	
		              <label>党建品牌名称:</label>
		            </td>
					<td class="width-35">
						<form:input path="brandName" htmlEscape="false" class="form-control"      />
						<label class="Validform_checktip"></label>
					</td>
				</tr>
				<tr>
					<td  class="width-15 active text-right">	
		              <label>党组织简介:</label>
		            </td>
					<td class="width-35" colspan="3">
						<form:textarea path="remarks" htmlEscape="false" class="form-control"      />
						<label class="Validform_checktip"></label>
					</td>
		  		</tr>
		  		
				<tr>
					<td  class="width-15 active text-right">	
		              <label>党建品牌展示:</label>
		            </td>
					<td class="width-35" colspan="3">		
					   <input id="relateTable1" type="hidden" value="dj_org"/>
   						<!-- relateFeild1 该值对多控件文件上传需要唯一标识否则界面样式异常，注：多文件上传集成框架使用不到该值，需要使用url参数传值 -->
						<input id="relateFeild1" type="hidden" value="files" nested="false" />
						<form:fileinput buttonText="选择文件" saveType="billId" fileActionSettings="{showRemove: true,showUpload: false}"
   isFormSubmit="true" uploadExtraFieldData="relateTable1,relateFeild1" path="files" extend="bmp,gif,jpg,jpeg,png"	
   initUrl="${adminPath}/sys/attachment/list?relateTable=dj_org&relateFeild=files"
   uploadUrl="${adminPath}/sys/attachment/upload?relateTable=dj_org&relateFeild=files"
   showUpload="false" showRemove="false" nested="false"  autoUpload="false" uploadAsync="false"
   htmlEscape="false" class="form-control"   fileInputWidth="100px"  fileInputHeight="100px"/>
   <label class="Validform_checktip"></label>
						<label class="Validform_checktip"></label>
					</td>
		  		</tr>
		      
		   </tbody>
		</table>   
	</form:form>
	<html:js name="bootstrap-fileinput" />
	<html:js name="simditor" />
<script type="text/javascript"> 

	function setCallBack(data){
		if(data.length>0){
			$('#parentName').val(data[0].name);
		}else{
			$('#parentName').val('${data.parentName}');
		}
	}
</script>
</body>
</html>